extends Spatial

export(Sky) var sky_override: Sky = null

func _ready():
	if sky_override != null:
		if sky_override.has_method("generate"):
			sky_override.generate()
		var camera: Camera = $MyCamera/Camera
		var env: Environment = camera.environment
		if env == null:
			env = preload("res://default_env.tres")
		env = env.duplicate()
		env.background_sky = sky_override
		camera.environment = env
